#pragma once
char* strcats(char* str1, char* str2)
{
	int count1 = 0, count2 = 0, i;
	if (str1)
	{
		while (str1[count1] != '\0')
		{
			count1++;
		}
	}
	if (str2)
	{
		while (str2[count2] != '\0')
		{
			count2++;
		}
	}

	char *cat = (char *)malloc(sizeof(char)*(count1 + count2 + 1));
	for (i = 0; i < count1; i++)
	{
		cat[i] = str1[i];
	}
	for (i = count1; i < count1 + count2; i++)
	{
		cat[i] = str2[i - count1];
	}
	cat[i] = '\0';
	return cat;
}
